Denotational Semantics of Evaluation Order in Expressions with Side Effects
نویسنده
چکیده
The presence of side effects in even a very simple language of expressions gives rise to a number of semantic questions. The issue of evaluation order becomes a crucial one and, unless a strict order is enforced, the language becomes non-deterministic. In this paper we study the semantics of such a language under a variety of possible evaluation strategies, from simpler to more complex, concluding with unspecified evaluation order, unspecified order of side effects and the mechanism of sequence points that is particular to the ANSI C programming language. In doing so, we adopt the denotational semantics approach and use monads to improve modularity and to reduce the number of changes required for each transition. The result is a better understanding of different evaluation strategies, possibly leading to non-determinism in the presence of side effects, and a unified way of specifying their semantics. Furthermore, a significant step is achieved towards a correct denotational semantics for ANSI C.
منابع مشابه
A study of evaluation order semantics in expressions with side effects
The presence of side effects in even a very simple language of expressions gives rise to a number of semantic questions. The issue of evaluation order becomes a crucial one and, unless a specific order is enforced, the language becomes non-deterministic. In this paper we study the denotational semantics of such a language under a variety of possible evaluation strategies, from simpler to more c...
متن کاملA duality between LM-fuzzy possibility computations and their logical semantics
Let X be a dcpo and let L be a complete lattice. The family σL(X) of all Scott continuous mappings from X to L is a complete lattice under pointwise order, we call it the L-fuzzy Scott structure on X. Let E be a dcpo. A mapping g : σL(E) −> M is called an LM-fuzzy possibility valuation of E if it preserves arbitrary unions. Denote by πLM(E) the set of all LM-fuzzy possibility valuations of E. T...
متن کاملCategorical Models for Local Names
This paper describes the construction of categorical models for the nu-calculus, a language that combines higher-order functions with dynamically created names. Names are created with local scope, they can be compared with each other and passed around through function application, but that is all. The intent behind this language is to examine one aspect of the imperative character of Standard M...
متن کاملOn the Observable Properties of Higher Order Functions that Dynamically Create Local Names (Preliminary Report)
The research reported in this paper is concerned with the problem of reasoning about properties of higher order functions involving state. It is motivated by the desire to identify what, if any, are the difficulties created purely by locality of state, independent of other properties such as side-effects, exceptional termination and nontermination due to recursion. We consider a simple language...
متن کاملA Sound Metalogical Semantics for Input/Output Effects
We study the longstanding problem of semantics for in-put/output (I/O) expressed using side-eeects. Our vehicle is a small higher-order imperative language, with operations for interactive character I/O and based on ML syntax. Unlike previous theories, we present both operational and denotational semantics for I/O eeects. We use a novel labelled transition system that uniformly expresses both a...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1998